from google.appengine.ext import db
from google.appengine.ext.db import polymodel

class Product(polymodel.PolyModel):
    description = db.TextProperty(
        verbose_name='description',
        required    =True)

class Barcode(db.Model):
    #named key used as barcode value
    product = db.ReferenceProperty(Product, required=True)